﻿<%@ Page Language="C#" MasterPageFile="~/Forum.master" AutoEventWireup="true" CodeBehind="HomePage.aspx.cs" Inherits="Forums.HomePage" EnableSessionState="True"  %>


<%@ Register src="UserControls/LoginInfo.ascx" tagname="LoginInfo" tagprefix="uc1" %>

<asp:Content ID="content2" ContentPlaceHolderID="menuContentHolder" runat="server">
    <uc1:LoginInfo ID="loginInfo" runat="server" OnbtnLoginClicked="btnLogin_Clicked" />
</asp:Content>

<asp:Content ID="content" ContentPlaceHolderID="mainContentHolder" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
        DataSourceID="HomepageGrid" style="margin-top: 0px" AllowPaging="True">
        <Columns>
            <asp:BoundField DataField="TopicName" HeaderText="Main Topics" 
                SortExpression="TopicName" />
            <asp:BoundField DataField="LastThreadDate" HeaderText="Date of Last Activity" 
                SortExpression="LastThreadDate" DataFormatString="{0:D}" />
            <asp:BoundField DataField="NumOfThreads" HeaderText="Number of Threads" 
                SortExpression="NumOfThreads" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="HomepageGrid" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CentForumsDB %>" 
        SelectCommand="SELECT [TopicID], [TopicName], [LastThreadDate], [NumOfThreads] FROM [vw_TopicSummary]">
</asp:SqlDataSource>
</asp:Content>

